<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="/reportSumation">
    <html>
<head>
<style>

.totalday {
    background-color: grey;
    color: white
}
</style>
</head>
<body>
        <h1><xsl:value-of select="@group_title"/></h1>
        <hr/>
        <xsl:for-each select="subReport"> <!-- Year and Month -->
        <h2><xsl:value-of select="concat(@group_title,' : ',@grouping )"/></h2>
        
	        <xsl:for-each select="subReport"> <!-- Month and Day -->
	        <table border="1" width="100%">
	          <tr><th colspan="2"><xsl:value-of select="concat(@group_title,': ',@grouping )"/></th></tr>
	           <tr><td>Project</td><td width="200px">Hours</td></tr>
	           <xsl:for-each select="subReport"> <!-- Project -->
	                <tr><td><xsl:value-of select="concat(@group_title,': ',@grouping )"/></td><td width="200px"><xsl:value-of select="round(total_time * 1000) div 1000" /></td></tr>
	           </xsl:for-each>
	           <tr class="totalday" ><td>Total Hours</td><td><xsl:value-of select="round(total_time * 1000) div 1000" /></td></tr>
	           <tr class="totalday" ><td>Total Tasks</td><td><xsl:value-of select="total_tasks" /></td></tr>
	           <tr class="totalday" ><td>Average Minutes / Task</td><td><xsl:value-of select="round(total_time div total_tasks * 60)" /></td></tr>
	        </table>
	        <br/>
	        </xsl:for-each>
        
        
        </xsl:for-each>
       
        </body>
</html>
    </xsl:template>
    

</xsl:stylesheet>